﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Ferreteria.Forms.GestionPedidos;

namespace Ferreteria.Forms.GestionPedidos
{
    public partial class FrmIncrementoNC : Form
    {
        decimal inc;
        int Comprobidventa;
        int clienteid;
        string tipocomp;

        public FrmIncrementoNC(int idvta,int idcli,string tipoc)
        {
            InitializeComponent();
            Comprobidventa = idvta;
            clienteid = idcli;
            tipocomp = tipoc; //A o B o X el comprobante relacionado con la nota de credito
            bttnAceptar.Select();
        }

        private void NumUpInc_ValueChanged(object sender, EventArgs e)
        {
            bttnAceptar.Select();
        }

        private void bttnAceptar_Click(object sender, EventArgs e)
        {
            inc = NumUpInc.Value;
            this.Close();

            FrmNotaCredito ncredito = new FrmNotaCredito(Comprobidventa, clienteid, tipocomp,inc);
            ncredito.ShowDialog();
         }

        private void bttnCancelar_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
